<?php
session_start();
include_once("function_right.php");
if(!JudgeUserRight()) return FALSE;

include_once "function_sec_antivirus.php";
$number = $_POST['number'];
$in_array['Name'] = base64_encode($_POST['Name']);
$in_array['InDev'] = $_POST['InDev'];
$in_array['OutDev'] = $_POST['OutDev'];
$in_array['SrcAddr'] = $_POST['SrcAddr'];
$in_array['DstAddr'] = $_POST['DstAddr'];
$in_array['Srv'] = $_POST['Srv'];
$in_array['Time'] = $_POST['Time'];
$in_array['Target'] = $_POST['Target'];
$in_array['Log'] = $_POST['log'];
$in_array['Type'] = 0;
$in_array['Enabled'] = $_POST['Enabled'];

$av = new CSecAntiVirus();
$av->insert_item_by_num($number, $in_array);
$av->Apply();

include_once "function_misc_log.php";
$in_array['Name'] = "'". $in_array['Name']. "'";
$in_array['SrcAddr'] = "'". $in_array['SrcAddr']. "'";
$in_array['DstAddr'] = "'". $in_array['DstAddr']. "'";
$in_array['Srv'] = "'". $in_array['Srv']. "'";
$in_array['Time'] = "'". $in_array['Time']. "'";
logger("Insert", $in_array, "Securit_AntiVirus");

include "function_web_misc.php";
PrintSuccessPageAndJump('sec_antivirus_rule.php');
//echo("<meta http-equiv='refresh'content=0;URL='sec_antivirus_rule.php'>");
?>
